package com.jetseter.game.champion.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.jetseter.game.champion.model.Player;
import com.jetseter.game.champion.service.PlayerService;

import org.slf4j.Logger;  
import org.slf4j.LoggerFactory;  

@RestController  
public class PlayerController {
	private final Logger logger = LoggerFactory.getLogger(this.getClass());  
	
	@Autowired PlayerService ps;

    @RequestMapping("/hs")
    @ResponseBody
    public String index() {
        return "Okay1";
    }
    
    @RequestMapping("/cp/test")
    @ResponseBody
    public Player test() {
      	logger.debug("This is a debug message");  
        logger.info("This is an info message");  
        logger.warn("This is a warn message");  
        logger.error("This is an error message");
        return ps.test();
    }
}
